<template>
	<view>		
	  <!-- #ifdef MP-WEIXIN -->
	  <navbar :bgColor="bgColor" :btnColors='btnColor' title="支付成功" :isGoBack="true" :isNotice="true" :visible="true"></navbar>
	  <!-- #endif -->	
	  <view class="main-cur flex flex-direction text-dff " style="line-height: 2.55555556;">
	        <view class="flex justify-center align-center flex-direction mb-20" style="margin-top: 60rpx;">
				<image :src="api_url+'/static/upload/81c5d053bc2608f3/1e0925447526bd66.png'" style="width: 120rpx; height: 120rpx;"></image>
	          	<text class="flex" style="font-weight: 600;font-size: 46rpx;color: #00CA58;color: #00CA58;line-height: 7rpx;margin-top: 50rpx;">订单支付成功</text>
	        </view>				
	  </view>
		<view class="flex flex-direction ml-50 mr-50" style="margin-top: 180rpx;">			
			<view class="submit-btn-right mt-20" @click="handleClickOrder()">查看订单</view>
			<view class="submit-btn-left mt-30"  @click="handleClickHome()">返回首页</view>				    				
		</view>	
	</view>
</template>

<script>
	export default {
		
		data() {
		   	return {
				...getApp().globalData.config,
				orderInfo:{},
				pay_no:'WX794670782766811687376',
				type:1
			}			
		},
		onShow() {
			this.order_pay()
				
		},
		onLoad(options) {
			this.pay_no=options.pay_no
			if(options.type){
				this.type=options.type
			}
		},
		onBackPress(e) {
		    this.$routers.router('/pages/order/index','navigateTo') 
		},
		methods:{
			handleClickOrder(){
				 this.$routers.router('/pages/order/index','navigateTo')  
			},
			handleClickHome(){
				 this.$routers.router('/pages/home/index','switchTab')  
			},
			order_pay(){
				let obj_data={
					pay_no:this.pay_no,
					type:this.type,
				}
				this.$http.order_info(obj_data).then(res=>{
					  if(res.resCode=='9999'){
						  this.orderInfo=res.data
					  }
					
				})
			}
		}
	}
</script>

<style>
		@import "./index.css";
</style>